﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using svCore;
using Vux.Helper.Numeric;
using Vux.Helper.Imaging;

namespace DemoAntiPhishing
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            #region Test 1
            //GifHelper g = new GifHelper("idx16.gif");

            //var v_factorial = 9.GetFactorial();
            //var v_abc = BitConverter.ToInt32(v_factorial, 0);

            //var v_a1 = BitConverter.GetBytes(150);
            //var v_result = v_a1.Mutiply(2);

            //var v_a2 = BitConverter.ToInt32(v_result, 0);

            #endregion
             var phiding = new PaletteHiding("idx16.gif");

            #region Test 2


            #endregion

            var calc = BigUInt.Create(256);

            var sobichia = BitConverter.GetBytes(54214);
            var sochia = BitConverter.GetBytes(54);
            var remain = new byte[0];
            var quotient = calc.Chia(sobichia, sochia, out remain);

            var test = quotient.Trim(4);
            var aaa = BitConverter.ToInt32(test, 0);

            test = remain.Trim(4);
            aaa = BitConverter.ToInt32(test, 0);

            calc.TestMethod();
            var a100 = BitConverter.GetBytes(9000);
            var b100 = BitConverter.GetBytes(9000);
            var result = calc.Cong(a100, b100);
            //var a = new byte[] { 1, 3, 2, 1 };
            //var b = new byte[] { 0, 1, 2, 1 };
            //var c = calc.Cong(a, b);
            var d = BitConverter.ToInt32(result, 0);
            
            // nhan
            result = calc.Nhan(a100, b100);
            d = BitConverter.ToInt32(result, 0);
            var fac = calc.GetFactorial(256);


            //var result = calc.Cong(new byte[]{1}, new byte[]{2});

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }
    }
}
